﻿#region Copyright ©2008-2010, Technische Universitaet Muenchen
// ====================================================================================================
//
// Last Changed by       $Author: kalus $
// Last Changed Date     $LastChangedDate: 2009-05-18 13:41:04 +0200 (Mon, 18 May 2009) $
// Last Changed Revision $Rev: 145 $
//
// ====================================================================================================
#endregion

using System.Collections.Generic;

namespace Tum.CollabXT.Simulator
{
   public struct SystemElementTypes
   {
      public const string System = "System";
      public const string SWUnit = "SW-Einheit";
      public const string SWComponent = "SW-Komponente";
      public const string SWModule = "SW-Modul";
      public const string HWUnit = "HW-Einheit";
      public const string HWComponent = "HW-Komponente";
      public const string HWModule = "HW-Modul";

      public static Dictionary<string, string> ProductIds = new Dictionary<string,string>();

      static SystemElementTypes()
      {
         ProductIds.Add(SystemElementTypes.System, "4e03f8cf88ab9d");
         ProductIds.Add(SystemElementTypes.SWUnit, "d4a5f6afc25563");
         ProductIds.Add(SystemElementTypes.SWComponent, "15130f843e1272d");
         ProductIds.Add(SystemElementTypes.SWModule, "148b3f843e1cc82");
         ProductIds.Add(SystemElementTypes.HWUnit, "");
         ProductIds.Add(SystemElementTypes.HWComponent, "");
         ProductIds.Add(SystemElementTypes.HWModule, "");
      }
   }

   class SystemElement
   {
      private string _name = string.Empty;
      private string _type = string.Empty;
      private SystemElement _parent;

      public string Name
      {
         get { return _name; }
      }

      public string Type
      {
         get { return _type; }
      }

      public SystemElement Parent
      {
         get { return _parent; }
      }

      public SystemElement(string name, string type, SystemElement parent)
      {
         _name = name;
         _type = type;
         _parent = parent;
      }
   }

   class Architecture
   {
      private List<SystemElement> _nodes;

      public List<SystemElement> Nodes
      {
         get { return _nodes; }
         set { _nodes = value; }
      }

      public Architecture()
      {
         _nodes = new List<SystemElement>();
      }
   }
}
